Skip to content

feat: Airflow 3.0.1 (experimental) #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

feat: Airflow 3.0.1 (experimental) #630

wants to merge 19 commits into from

Conversation

adwk67
Copy link
Member

@adwk67 adwk67 commented May 20, 2025

Description

Related to #618

Most changes in this PR are due to the fact that the API has changed and both old and new versions need to be available for the tests. Code changes can be summarised as:

  • adding a condition for the start commands
  • adding a condition for new env-vars
  • minor change to logging definition

N.B. this PR does not cover updates to OPA-Auth (covered separately).

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the [style guide]
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Roadmap has been updated

@adwk67 adwk67 mentioned this pull request May 15, 2025
6 tasks
@adwk67 adwk67 marked this pull request as ready for review May 27, 2025 11:12
@adwk67 adwk67 moved this to Development: Waiting for Review in Stackable Engineering May 27, 2025
@adwk67 adwk67 self-assigned this May 27, 2025
@maltesander maltesander self-requested a review May 27, 2025 12:39
@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering May 27, 2025
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First batch, will do some more testing.

Comment on lines +895 to 906
min: Some(Quantity("1".into())),
max: Some(Quantity("2".into())),
},
MemoryLimitsFragment {
limit: Some(Quantity("2Gi".into())),
limit: Some(Quantity("3Gi".into())),
runtime_limits: NoRuntimeLimitsFragment {},
},
),
AirflowRole::Webserver => (
CpuLimitsFragment {
min: Some(Quantity("500m".into())),
min: Some(Quantity("1".into())),
max: Some(Quantity("2".into())),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +415 to +419
env.insert("AIRFLOW__API_AUTH__JWT_SECRET".into(), EnvVar {
name: "AIRFLOW__API_AUTH__JWT_SECRET".into(),
value: Some(JWT_KEY.clone()),
..Default::default()
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change if the operator restarts? That will invalidate access tokens, user sessions etc.? Maybe it makes sense to auto generate (or provide) a secret? Similar to the nifi sensitive properties key ?

Comment on lines +568 to +572
command.extend(vec![
"prepare_signal_handlers".to_string(),
format!("containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"),
"airflow api-server &".to_string(),
]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be templated for the process (api-server, celery worker...) and reused?

Comment on lines +24 to +26
{% if test_scenario['values']['airflow-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['airflow-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['airflow-latest'].split(',')[0] }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it on purpose to only test this (and others) for 3.x?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that one should probably be for all airflow versions, yes, as it is new functionality.

Comment on lines +8 to +16
{% if test_scenario['values']['airflow'].find(",") > 0 %}
- script: |
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
{% else %}
- script: |
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not much nicer, but less repetition (could be used elsewhere as well) :)

Suggested change
{% if test_scenario['values']['airflow'].find(",") > 0 %}
- script: |
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
{% else %}
- script: |
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
{% endif %}
{% if test_scenario['values']['airflow'].find(",") > 0 %}
{% set airflow_version = test_scenario['values']['airflow'].split(',')[0] %}
{% else %}
{% set airflow_version = test_scenario['values']['airflow'] %}
{% endif %}
- script: |
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group automatic-log-config --airflow-version "{{ airflow_version }}"
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/health.py --role-group custom-log-config --airflow-version "{{ airflow_version }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development: In Review
Development

Successfully merging this pull request may close these issues.

3 participants